import React, { useContext } from "react";
import './index.less'
import Schema from "../../store/schema";
import SchemaContainer from '../SchemaContainer'
import SchemaProvider from '../SchemaProvider'
import SchemaCustom from '../SchemaCustom'
import SchemaDisplay from '../SchemaDisplay'
export interface Child {
    children: React.ReactNode;
    data: Object | null
}

const PageWrapper: any = (props: Child) => {
    const schema = useContext(Schema)
    return (
        <div className="page_wrapper">
            <Schema.Provider value={schema}>
                <SchemaProvider>
                    <SchemaContainer>
                        <SchemaCustom></SchemaCustom>
                        <SchemaDisplay></SchemaDisplay>

                    </SchemaContainer>
                </SchemaProvider>

            </Schema.Provider>


        </div>
    )
}

export default PageWrapper